package org.sq;


import java.io.ObjectInputStream;

import android.app.Application;
import android.util.Log;

public class SQApp extends Application {

	private LevelManager levelManager;

//	public synchronized LevelManager levelManager() {
//		if (levelManager == null) {
//			try
//
//			{
//
//				ObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File(getFilesDir() + "/save.bin")));
//
//				levelManager = (LevelManager) ois.readObject();
//				Log.d("StreamQuest", "LevelManager restored from " + (getFilesDir() + "/save.bin"));
//
//			}
//
//			catch (Exception ex)
//
//			{
//
//				Log.e("StreamQuest", "Error:"+ ex.getMessage());
//
//				levelManager = new LevelManager();
//
//
//			}
//
//		}
//		return levelManager;
//	}


	public synchronized LevelManager levelManager() {
		if (levelManager == null){
			levelManager = new LevelManager(this);
		}
		return levelManager;
	}

}
